//////////////////////////////////
// Win32WrapperClass			//
//                              //
// File: Main.cpp               //
// Desc: Main entry point for   //
//			the splash app      //
//////////////////////////////////

#include "Main.h"

// Global Variables
HINSTANCE				g_hInstance;
RegionCreatorWindow      *g_pWindow;


INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
				   LPSTR lpCmdLine, int nCmdShow) {

					   g_hInstance = hInstance;

					   // Define the dimensions of our app window
					   RECT dimensions;
					   dimensions.top		= 0;
					   dimensions.left		= 0;
					   dimensions.bottom	= 500;
					   dimensions.right	= 500;


					   g_pWindow = new RegionCreatorWindow("RGNCR","RegionCreator",WS_OVERLAPPEDWINDOW|WS_VISIBLE,&dimensions,g_hInstance);
					   g_pWindow->Create();
					   g_pWindow->Show();
					   g_pWindow->BuildGUI();

					   MSG Msg;

					   while(1)
					   {

						   if (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE))
						   {
							   if (Msg.message == WM_QUIT)
								   break;
							   TranslateMessage(&Msg);
							   DispatchMessage(&Msg);

						   }

					   }

					   delete (g_pWindow);
					   return Msg.wParam;
}